package com.cxj.link.view;

import android.graphics.Point;

public class Cut {
    private int beginX;
    private int beginY;
    private CutImage image;
    private int indexX;
    private int indexY;

    public Cut(int paramInt1, int paramInt2) {
        this.indexX = paramInt1;
        this.indexY = paramInt2;
    }

    public int getBeginX() {
        return this.beginX;
    }

    public int getBeginY() {
        return this.beginY;
    }

    public Point getCenter() {
        return new Point(getImage().getImage().getWidth() / 2 + getBeginX(), getBeginY()
                + getImage().getImage().getHeight() / 2);
    }

    public CutImage getImage() {
        return this.image;
    }

    public int getIndexX() {
        return this.indexX;
    }

    public int getIndexY() {
        return this.indexY;
    }

    public boolean isSameImage(Cut paramPiece) {
        if ((this.image != null) || (paramPiece.image == null)) {
            return this.image.getImageId() == paramPiece.image.getImageId();
        } else
            return false;
    }

    public void setBeginX(int paramInt) {
        this.beginX = paramInt;
    }

    public void setBeginY(int paramInt) {
        this.beginY = paramInt;
    }

    public void setImage(CutImage paramPieceImage) {
        this.image = paramPieceImage;
    }

    public void setIndexX(int paramInt) {
        this.indexX = paramInt;
    }

    public void setIndexY(int paramInt) {
        this.indexY = paramInt;
    }
}